package dc.connectionmanager.database;

import dc.connectionmanager.logic.AConnectionManager;

abstract public class DBConnectionManager extends AConnectionManager 
{
	protected String host;
	protected int port;
	protected String username;
	protected String password;
	protected String database;
		
	public DBConnectionManager(String nHost, int nPort, String nUsername, String nPassword, String nDatabaseName)
	{
		super();
		this.host = nHost;
		this.port = nPort;
		this.username = nUsername;
		this.password = nPassword;
		this.database = nDatabaseName;
	}

	public static String OracleConnectionString(String host, int port, String sid)
	{
		return "jdbc:oracle:thin:@"+host+":"+port+":"+sid;
	}
	
	public static String MSSQLConnectionString(String host, int port, String database)
	{
		return "jdbc:weblogic:mssqlserver4:"+database+"@"+host+":"+port;
	}
	
	public static String MySQLConnectionString(String host, int port, String database)
	{
		return "jdbc:mysql://"+host+":"+port+"/"+database;
	}
	
	public static String PostgreSQLConnectionString(String host, int port, String database)
	{
		return "jdbc:postgresql://"+host+":"+port+"/"+database;
	}

	
	
}
